<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
<title></title>
<%@include file="/common/ec.jsp"%>
<%@include file="/common/extjs.jsp" %>
<%@include file="/common/meta.jsp"%>
<script type="text/javascript">
function removeCases(caseId){
    Ext.MessageBox.confirm('提示','确实要删除该案件信息吗？', function(btn){
        if (btn == 'yes') {
           window.location.href="remove.do?model.id=" + caseId;
        }
    });		
}
</script>
</head>
<body>
<div class="x-panel">
<div class="x-panel-header">案件信息管理</div>
<div class="x-toolbar">
<table width="99%">
  <tr>
    <s:form action="index.do" method="post">
    	<td width="60">所属区县：</td>
	    <td width="150">
            <s:select id="regionMap" list="%{regionMap}" name="model.region" headerKey="" headerValue="--请选择--"
	              cssStyle="width:130px;"/>	 
		</td>
	    <td width="60">案件类型：</td>
	    <td width="150">
            <s:select id="caseType" list="%{caseTypeMap}" name="model.caseType" headerKey="" headerValue="--请选择--"
	              cssStyle="width:130px;"/>	 
		</td> 
	    <td width="60">案件标题：</td>
	    <td><s:textfield name="model.title" cssStyle="width:150px"></s:textfield>
	    <input type="submit" value="查询" class="button" />      
		</td> 		 
	    <td style=" padding-left:5px; padding-top:5px;" align="right">   
	        <a href="${ctx}/admin/cases/edit.do"><img src="${ctx}/images/icons/add.gif">新建案件</a>
	    </td>
    </s:form>
  </tr>
</table>
</div>
<div class="x-panel-body">
<div style="margin-left: -3px;" align="center">
<ec:table
  items="items" var="item" retrieveRowsCallback="limit" sortRowsCallback="limit" 
  action="index.do" 
  useAjax="false"
  doPreload="false" 
  pageSizeList="20,50,100,200" 
  editable="false"
  sortable="true" 
  rowsDisplayed="20" 
  generateScript="true"
  resizeColWidth="false" 
  classic="false" 
  width="100%" 
  height="400px"
  minHeight="400"
  toolbarContent="navigation|pagejump|pagesize|refresh|extend|status">
  <ec:row>
    <ec:column width="40" property="_num" title="No." value="${GLOBALROWCOUNT}" sortable="false" style="text-align:center"/> 
    <ec:column width="250" property="_title" title="案件标题" style="text-align:center" ellipsis="true">
       <a href="view.do?model.id=${item.id}" title="查看内容" ><font color="blue">${item.title}</font></a>
    </ec:column>    
    <ec:column width="150" property="region" title="所属区县" mappingItem="regionMap" style="text-align:center"/>    
    <ec:column width="120" property="caseType" title="案件类别" mappingItem="caseTypeMap" style="text-align:center"/>  
    <ec:column width="100" property="createTime" title="创建时间" style="text-align:center" cell="date"/>
    <ec:column width="80" property="inputer" title="创建人" style="text-align:center"/>                                       
    <ec:column width="100" property="_0" title="操作" style="text-align:center" sortable="false">
	   <a href="edit.do?model.id=${item.id}">编辑</a> |
	   <a href="#" onClick="removeCases(${item.id})">删除</a>  
	</ec:column>    
  </ec:row>
</ec:table>
</div>
</div>
</div>
</body>
</html>